package com.mfc.education.service.edu.feign;

import com.mfc.education.common.base.result.R;
import com.mfc.education.common.base.result.ResultCodeEnum;
import com.mfc.education.common.base.util.ExceptionUtils;
import com.mfc.education.service.base.exception.EduException;
import com.mfc.education.service.edu.feign.fallback.OssVodServiceFallBack;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author mfc
 * @since 2021/9/17
 */
@FeignClient(value = "service-vod", fallback = OssVodServiceFallBack.class)
@Service
public interface VodMediaService {
    // 注意PathVariable注解必须定义value 与url的参数相同
    // 写完整url
    @DeleteMapping("/admin/vod/media/remove/{videoId}")
    R removeVideo(@PathVariable("videoId") String videoId);


    @DeleteMapping("/admin/vod/media/remove")
    R removeVideoByIdList(
            @RequestBody List<String> videoIdList);

}
